using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Sigecov.Models.Mapping
{
    public class SupervisorMap : EntityTypeConfiguration<Supervisor>
    {
        public SupervisorMap()
        {
            // Primary Key
            this.HasKey(t => t.supId);

            // Properties
            this.Property(t => t.supNome)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Supervisor");
            this.Property(t => t.supId).HasColumnName("supId");
            this.Property(t => t.supNome).HasColumnName("supNome");
        }
    }
}
